<template>
    <h3>列表渲染</h3>
    <p v-for="item in names">{{ item }}</p>
    <p v-for="(item, index) in names">{{ item }}-{{ index }}</p>
    <div>
        <p v-for="(value, key, index) of userInfo">{{ value }} -{{ key }}-{{ index }}</p>
    </div>
</template>
<script>
export default {
    data() {
        return {
            names: ["百战程序员", "尚学堂", "IT"],
            userInfo: {
                name: "张三",
                age: 20,
                sex: "男"
            }
        }
    }
}
</script>